package com.igeek.javase.relation.shopping;

/**
 * @author chenmin
 * 2023/7/13 20:11
 * @description TODO
 */
public class Goods {

    private String goodsName;
    private double price;
    private String description;
    private int amount;
    private Order order;
    private String orderNumber;

    public Order getOrder() {
        return order;
    }

    public void setOrder(Order order) {
        this.order = order;
    }

    public Goods() {
    }

    public Goods(String goodsName, double price, String description, int amount) {
        this.goodsName = goodsName;
        this.price = price;
        this.description = description;
        this.amount = amount;
    }

    /**
     * 获取
     * @return goodsName
     */
    public String getGoodsName() {
        return goodsName;
    }

    /**
     * 设置
     * @param goodsName
     */
    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    /**
     * 获取
     * @return price
     */
    public double getPrice() {
        return price;
    }

    /**
     * 设置
     * @param price
     */
    public void setPrice(double price) {
        this.price = price;
    }

    /**
     * 获取
     * @return description
     */
    public String getDescription() {
        return description;
    }

    /**
     * 设置
     * @param description
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * 获取
     * @return amount
     */
    public int getAmount() {
        return amount;
    }

    /**
     * 设置
     * @param amount
     */
    public void setAmount(int amount) {
        this.amount = amount;
    }

    public String toString() {
        return "Goods{goodsName = " + goodsName + ", price = " + price + ", description = " + description + ", amount = " + amount + "}";
    }

    public  void showGoods() {
            System.out.println("商品名称：" + goodsName);
            System.out.println("商品价格：" + price);
            System.out.println("商品描述：" + description);
            System.out.println("商品数量：" + amount);
        }


}


